package com.ganbo.common.utils;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 接口返回结果
 * Created by ganbo on 2019/6/24.
 */

@Data
@AllArgsConstructor
public class Result {

    private boolean success = true;
    private Object data;

    public static Result fail(Object data) {
        return new Result(false, data);
    }

    public static Result success(Object data) {
        return new Result(true, data);
    }

}
